package com.jlkf.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jlkf.pojo.TblRole;
import com.jlkf.pojo.TblSort;
import com.jlkf.service.CommonService;
import com.platform.server.response.response.pojo.ReturnData;

@Controller
@RequestMapping("common")
public class CommonController {
	@Autowired
	private CommonService commonService;
	
	/**
	 * 查询课程分类
	 * @return
	 */
	@RequestMapping("selectType")
	@ResponseBody
	public ReturnData selectType(){
		List<TblSort> list = commonService.selectList();
		return new ReturnData(list,200,"三级分类");
	}
	
	/**
	 * 查询角色列表
	 * @return
	 */
	@RequestMapping("getRoleList")
	@ResponseBody
	public ReturnData getRoleList(){
		List<TblRole> list = commonService.getRoleList();
		return new ReturnData(list,200,"角色列表");
	}
}
